import request from '@/utils/request'

export function listSearch(currentPage, pageSize, queryOrderDTO) {
  return request({
    url: `/order/list/${currentPage}/${pageSize}`,
    method: 'post',
    data: queryOrderDTO
  })
}

export function getDetailById(id) {
  return request({
    url: `/order/getDetailById/${id}`,
    method: 'get'
  })
}

export function updateOrderToPay(id) {
  return request({
    url: `/order/toPay/${id}`,
    method: 'get'
  })
}

export function getAppealByOrderId(orderId) {
  return request({
    url: `/appeal/getAppealByOrderId/${orderId}`,
    method: 'get'
  })
}

export function handleAppealById(appeal) {
  return request({
    url: `/appeal/handleAppealById`,
    method: 'post',
    data: appeal
  })
}
